﻿#ifndef FRIENDITEM_H
#define FRIENDITEM_H

#include <QWidget>
#include <QMouseEvent>

namespace Ui {
class FriendItem;
}

class FriendItem : public QWidget
{
    Q_OBJECT

public:
    explicit FriendItem(QString email,QString username,QString sign,QWidget *parent = nullptr);
    ~FriendItem();
    void setNormalStyle();
    void setClickStyle();
    void updateHeadImg();
    QString getEmail();
signals:
    void clicked(FriendItem* item);
    void showComm(QString email,QString name);
protected:
    void mousePressEvent(QMouseEvent* event);
    void mouseDoubleClickEvent(QMouseEvent* event);
private:
    Ui::FriendItem *ui;
    QString email;
};

#endif // FRIENDITEM_H
